home *** CD-ROM | disk | FTP | other *** search
/ Shareware Super Platinum 8 / Shareware Super Platinum 8.iso / mac / DATABASE / TEXT2DBF.ZIP;1 / TEST.CDF < prev    next >
Encoding:
Text File  |  1992-09-08  |  5.9 KB  |  103 lines

  1. *******************************************************************************
  2. *  Sample Conversion Definition File (CDF) for TEXT2DBF                       *
  3. *                                                                             *
  4. *    - Blank lines and lines beginning with "*" are ignored                   *
  5. *                                                                             *
  6. *    - Each line defines a field in the destination database and an           *
  7. *      expression that retrieves the data from the source file.  The          *
  8. *      expression may can contain any Clipper 5 function to convert or        *
  9. *      manipulate the source data.  Two additional user-defined functions     *
  10. *      are included and may be used: VALIMPDEC() - converts a numeric string  *
  11. *      with an implied decimal to Clipper numeric, CDT2DATE() - converts a    *
  12. *      string date in many formats to a Clipper date.                         *
  13. *                                                                             *
  14. *    - 2 variables are available for expressions:                             *
  15. *         nCnt  - text record counter                                         *
  16. *         cRec  - entire text record                                          *
  17. *                                                                             *
  18. *    - Field definition format is as follows:                                 *
  19. *         field_name | type | length | decimals | expression                  *
  20. *                                                                             *
  21. *      The pipes (|) are REQUIRED item separators.  All items are required    *
  22. *      and must abide by Clipper 5 field definition rules.                    *
  23. *                                                                             *
  24. *    - Sample expressions:                                                    *
  25. *        For the following examples, assume the record counter nCnt = 12      *
  26. *        and the record cRec contains the following:                          *
  27. *           081292My dog has fleas 100 1FOO                                   *
  28. *                                                                             *
  29. *        CDT2DATE(SUBSTR(cRec,1,6),"M2D2Y2")    ==> 08/12/92           (date) *
  30. *        CDT2DATE(SUBSTR(cRec,1,6),"D2M2Y2")    ==> 12/08/92           (date) *
  31. *        SUBSTR(cRec,7,16)                      ==> My dog has fleas   (char) *
  32. *        VAL(SUBSTR(cRec,24,3))                 ==>        100         (num)  *
  33. *        IIF(SUBSTR(cRec,28,1)=="0",.F.,.T.)    ==> .T.                (log)  *
  34. *        SUBSTR(cRec,29,3)+"BAR"                ==> FOOBAR             (char) *
  35. *        "X"                                    ==> X                  (char) *
  36. *        nCnt                                   ==>         12         (num)  *
  37. *        STR(nCnt,6)                            ==>     12             (char) *
  38. *        VALIMPDEC(SUBSTR(cRec,1,6),2)          ==>     812.92         (num)  *
  39. *        VALIMPDEC(SUBSTR(cRec,1,6),4)          ==>     8.1292         (num)  *
  40. *                                                                             *
  41. *******************************************************************************
  42.  
  43. ACCOUNT    |C|  7|  0| SUBSTR(cRec,1,7)
  44. DATE       |D|  8|  0| CDATE2DT(SUBSTR(cRec,10,6))
  45. P_NUMBER   |C|  7|  0| SUBSTR(cRec,16,7)
  46. P_DATE     |D|  8|  0| CDATE2DT(SUBSTR(cRec,25,6))
  47. P_TYPE     |C|  1|  0| SUBSTR(cRec,31,1)
  48. P_MAP      |C|  5|  0| SUBSTR(cRec,32,5)
  49. P_BLOCK    |C|  5|  0| SUBSTR(cRec,37,5)
  50. P_LOT      |C|  4|  0| SUBSTR(cRec,42,4)
  51. P_INDEX    |C|  7|  0| SUBSTR(cRec,47,7)
  52. OWNER      |C| 35|  0| SUBSTR(cRec,54,35)
  53. ADDR1      |C| 35|  0| SUBSTR(cRec,89,35)
  54. ADDR2      |C| 35|  0| SUBSTR(cRec,124,35)
  55. ADDR3      |C| 35|  0| SUBSTR(cRec,159,35)
  56. ADDR4      |C| 35|  0| SUBSTR(cRec,194,35)
  57. STATE      |C|  2|  0| SUBSTR(cRec,229,2)
  58. ZIP        |C|  9|  0| SUBSTR(cRec,232,5)+SUBSTR(cRec,239,4)
  59. COUNTRY    |C|  1|  0| SUBSTR(cRec,243,1)
  60. HISTORY1   |C|  7|  0| SUBSTR(cRec,245,7)
  61. HISTORY2   |C|  7|  0| SUBSTR(cRec,253,7)
  62. ACREAGE    |N|  8|  2| VALIMPDEC(SUBSTR(cRec,261,7))
  63. REV_STAMPS |N| 12|  2| VALIMPDEC(SUBSTR(cRec,269,11))
  64. DEF_CODE   |C|  1|  0| SUBSTR(cRec,280,1)
  65. DEF_AMOUNT |N|  9|  0| VAL(SUBSTR(cRec,282,9))
  66. PROP_DESC  |C| 40|  0| SUBSTR(cRec,291,40)
  67. D_BOOK     |C|  4|  0| SUBSTR(cRec,331,4)
  68. D_PAGE     |C|  4|  0| SUBSTR(cRec,335,4)
  69. D_DATE     |D|  8|  0| CDATE2DT(SUBSTR(cRec,341,6))
  70. BILL_CLASS |C|  1|  0| SUBSTR(cRec,347,1)
  71. FIRE       |C|  2|  0| SUBSTR(cRec,348,2)
  72. SPEC_DIST1 |C|  3|  0| SUBSTR(cRec,350,3)
  73. SPEC_DIST2 |C|  3|  0| SUBSTR(cRec,353,3)
  74. SPEC_DIST3 |C|  3|  0| SUBSTR(cRec,356,3)
  75. CITY       |C|  3|  0| SUBSTR(cRec,359,3)
  76. TS_PRICE   |N| 11|  0| VAL(SUBSTR(cRec,363,11))
  77. TS_DATE    |D|  8|  0| CDATE2DT(SUBSTR(cRec,376,6))
  78. TS_QFLAG   |C|  1|  0| SUBSTR(cRec,382,1)
  79. L_PRICE    |N| 11|  0| VAL(SUBSTR(cRec,384,11))
  80. L_DATE     |D|  8|  0| CDATE2DT(SUBSTR(cRec,397,6))
  81. L_QFLAG    |C|  1|  0| SUBSTR(cRec,403,1)
  82. PIN_MAP    |C|  5|  0| SUBSTR(cRec,405,5)
  83. PIN_MAPPG  |C|  3|  0| SUBSTR(cRec,411,3)
  84. PIN_BLOCK  |C|  3|  0| SUBSTR(cRec,415,3)
  85. PIN_LOTEXT |C|  7|  0| SUBSTR(cRec,419,7)
  86. CALC_ACRES |N|  8|  2| VALIMPDEC(SUBSTR(cRec,427,7))
  87. VCS        |C|  5|  0| SUBSTR(cRec,439,5)
  88. EQ_ZONING  |C|  5|  0| SUBSTR(cRec,440,5)
  89. ETJ        |C|  2|  0| SUBSTR(cRec,445,2)
  90. C_DATE     |C|  5|  0| SUBSTR(cRec,448,5)
  91. C_LAND_VAL |N| 11|  0| VAL(SUBSTR(cRec,439,11))
  92. C_BLDG_VAL |N| 11|  0| VAL(SUBSTR(cRec,466,11))
  93. C_OBLD_VAL |N|  9|  0| VAL(SUBSTR(cRec,478,9))
  94. C_TBAC_VAL |N|  7|  0| VAL(SUBSTR(cRec,488,7))
  95. LAND_CLASS |C|  1|  0| SUBSTR(cRec,439,1)
  96. LAND_LINE1 |C| 11|  0| SUBSTR(cRec,498,11)
  97. LAND_LINE2 |C| 11|  0| SUBSTR(cRec,510,11)
  98. LAND_LINE3 |C| 11|  0| SUBSTR(cRec,522,11)
  99. LAND_LINE4 |C| 11|  0| SUBSTR(cRec,534,11)
  100. LAND_LINE5 |C| 11|  0| SUBSTR(cRec,546,11)
  101. LAND_LINE6 |C| 11|  0| SUBSTR(cRec,558,10)
  102. USE_FLAG   |C|  6|  0| SUBSTR(cRec,568,1)
  103.